package com.itheima.admin.controller;

import com.itheima.admin.pojo.AdChannel;
import com.itheima.admin.service.AdChannelService;
import com.itheima.common.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ApiAdChannelFeignController {
    @Autowired
    private AdChannelService adChannelService;
    /**
     * 通过远程调用admin微服务查询频道信息
     * @param
     * @return
     */
    @PostMapping("/api/adChannel/list")
   public ResultVo<List<AdChannel>> list(){
        List<AdChannel> adChannels = adChannelService.list();
        return ResultVo.ok(adChannels);
    }
}
